data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# 低效
for i in data:
    if i % 2 == 0:
        data.remove(i)

data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# 高效
a = [i for i in data if i % 2 == 0]
b = filter(lambda x: x % 2 == 0, data)
print(a)
print(list(b))
